<template>
	<view class="peizhibox">
		<view class="nopeizhi" v-if="peizhimsg == '' || peizhimsg == null">
			<text>暂无配置信息</text>
		</view>
		<view class="peizhilist" v-else>
			
			<view class="peizhiItem">
				<text>品牌名称</text>
				<text>{{peizhimsg.brand}}</text>
			</view>
			<view class="peizhiItem">
				<text>车系名称</text>
				<text>{{peizhimsg.vehicle_name}}</text>
			</view>
			<view class="peizhiItem">
				<text>车型名称</text>
				<text>{{peizhimsg.vehicle_name+peizhimsg.sales_models[0].model}}</text>
			</view>
			<view class="peizhiItem">
				<text>车型</text>
				<text>{{peizhimsg.body}}</text>
			</view>
			<view class="peizhiItem">
				<text>座位数</text>
				<text>{{peizhimsg.seat}}</text>
			</view>
			<view class="peizhiItem">
				<text>车型级别</text>
				<text>{{peizhimsg.level}}</text>
			</view>
<!-- 			<view class="peizhiItem">
				<text>品牌首字母</text>
				<text>{{peizhimsg.driver_type}}</text>
			</view> -->
			<view class="peizhiItem">
				<text>上市年份</text>
				<text>{{peizhimsg.prod_time}}</text>
			</view>
			<view class="peizhiItem">
				<text>发动机型号(去除符号)</text>
				<text>{{peizhimsg.trans_code}}</text>
			</view>
			<view class="peizhiItem">
				<text>最大扭矩转速(rpm)</text>
				<text>{{peizhimsg.engine_kw}}</text>
			</view>
			<view class="peizhiItem">
				<text>发动机特有技术</text>
				<text>{{peizhimsg.chassis_code}}</text>
			</view>
			<view class="peizhiItem">
				<text>燃料形式</text>
				<text>{{peizhimsg.fuel_type}}</text>
			</view>
			<view class="peizhiItem">
				<text>燃油标号</text>
				<text>{{peizhimsg.fuel_grade}}</text>
			</view>
			<view class="peizhiItem">
				<text>供油方式</text>
				<text>{{peizhimsg.intake}}</text>
			</view>
			<view class="peizhiItem">
				<text>缸盖材料</text>
				<text>{{peizhimsg.engine_code}}</text>
			</view>
			<view class="peizhiItem">
				<text>类别</text>
				<text>{{peizhimsg.room}}</text>
			</view>
			<view class="peizhiItem">
				<text>驱动方式</text>
				<text>{{peizhimsg.driver_type}}</text>
			</view>
			<view class="peizhiItem">
				<text>门数</text>
				<text>{{peizhimsg.door}}</text>
			</view>
			<view class="peizhiItem">
				<text>四驱形式</text>
				<text>{{peizhimsg.driver_type}}</text>
			</view>
			<view class="peizhiItem">
				<text>发动机</text>
				<text>{{peizhimsg.trans_type}}</text>
			</view>
<!-- 			<view class="peizhiItem">
				<text>后悬架类型</text>
				<text>{{peizhimsg.intake}}</text>
			</view>
			<view class="peizhiItem">
				<text>助力类型</text>
				<text>{{peizhimsg.intake}}</text>
			</view> -->
			<view class="peizhiItem">
				<text>车体结构</text>
				<text>{{peizhimsg.body}}</text>
			</view>
<!-- 			<view class="peizhiItem">
				<text>前制动器类型</text>
				<text>{{peizhimsg.driver_type}}</text>
			</view>
			<view class="peizhiItem">
				<text>后制动器类型</text>
				<text>{{peizhimsg.driver_type}}</text>
			</view>
			<view class="peizhiItem">
				<text>驻车制动类型</text>
				<text>{{peizhimsg.driver_type}}</text>
			</view>
			<view class="peizhiItem">
				<text>前轮胎规格</text>
				<text>{{peizhimsg.driver_type}}</text>
			</view> -->
			<!-- <view class="peizhiItem">
				<text>后轮胎规格</text>
				<text>{{peizhimsg.driver_type}}</text>
			</view>
			<view class="peizhiItem">
				<text>备胎规格</text>
				<text>{{peizhimsg.driver_type}}</text>
			</view>
			<view class="peizhiItem">
				<text>膝部气囊</text>
				<text>{{peizhimsg.driver_type}}</text>
			</view>
			<view class="peizhiItem">
				<text>变速箱大修加注量</text>
				<text>{{peizhimsg.driver_type}}</text>
			</view>
			<view class="peizhiItem">
				<text>变速箱保养加注量</text>
				<text>{{peizhimsg.driver_type}}</text>
			</view>
			<view class="peizhiItem">
				<text>变速箱规格</text>
				<text>{{peizhimsg.driver_type}}</text>
			</view> -->
			<view class="peizhiItem">
				<text>厂商</text>
				<text>{{peizhimsg.sales_models[0].series_group}}</text>
			</view>
			<view class="peizhiItem">
				<text>发动机编号</text>
				<text>{{peizhimsg.engine_code}}</text>
			</view>
			<view class="peizhiItem">
				<text>排量</text>
				<text>{{peizhimsg.displacement}}</text>
			</view>
<!-- 			<view class="peizhiItem">
				<text>机油类型</text>
				<text>{{peizhimsg.fuel_grade}}</text>
			</view> -->
			
		</view>
		
	</view>
</template>
<script>
	import {
		cardvin
	} from "../../apis/used-car/api.js"
	export default{
		data(){
			return{
				params:{
					vin:'',
					factory:1
				},
				peizhimsg:''
			}
		},
		onLoad(query) {
			console.log(query)
			let that = this
			this.params.vin = query.vin || 'LFV3A28W7H3029978'
			console.log(this.params)
			cardvin(this.params).then(res=>{
				console.log(res)
				
				if(res.code == 1){
					that.peizhimsg = res.data
				}
			})
		}
	}
</script>
<style lang="less">
	.nopeizhi{
		text-align: center;
		line-height: 60rpx;
	}
	.peizhiItem{
		border-bottom: 1rpx solid #efefef;
		padding: 20rpx 30rpx;
		
		&:last-child {
			border-bottom: 0;
		}
		
		&::after{
			content: "";
			display: block;
			height: 0;
			overflow: hidden;
			clear: both;
		}
		text{
			float: left;
			font-size: 26rpx;
			line-height: 48rpx;
			color: #999;
			
			&:nth-child(2){
				float: right;
				color: #333;
			}
		}
	}
</style>